<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGraphicsObject Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGraphicsObject Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsObject class provides a base class for all graphics
items that require signals, slots and properties. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a> and <a href="qgraphicsitem.html">QGraphicsItem</a>.</p><p>Inherited by <a href="qdeclarativeitem.html">QDeclarativeItem</a>, <a href="qgraphicssvgitem.html">QGraphicsSvgItem</a>, <a href="qgraphicstextitem.html">QGraphicsTextItem</a> and <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicsobject.html#QGraphicsObject">__init__</a></b> (<i>self</i>, QGraphicsItem&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qgraphicsobject.html#grabGesture">grabGesture</a></b> (<i>self</i>, Qt.GestureType&#160;<i>type</i>, Qt.GestureFlags&#160;<i>flags</i>&#160;=&#160;Qt.GestureFlags(0))</li><li><div class="fn" /><b><a href="qgraphicsobject.html#ungrabGesture">ungrabGesture</a></b> (<i>self</i>, Qt.GestureType&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qgraphicsobject.html#updateMicroFocus">updateMicroFocus</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qgraphicsobject.html#enabledChanged">enabledChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#opacityChanged">opacityChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#parentChanged">parentChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#rotationChanged">rotationChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#scaleChanged">scaleChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#visibleChanged">visibleChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#xChanged">xChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#yChanged">yChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#zChanged">zChanged</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsObject class provides a base class for all graphics
items that require signals, slots and properties.</p>
<p>The class extends a <a href="qgraphicsitem.html">QGraphicsItem</a> with <a href="qobject.html">QObject</a>'s signal/slot and property mechanisms.
It maps many of <a href="qgraphicsitem.html">QGraphicsItem</a>'s
basic setters and getters to properties and adds notification
signals for many of them.</p>
<a id="parents-and-children" name="parents-and-children" />
<h3>Parents and Children</h3>
<p>Each graphics object can be constructed with a parent item. This
ensures that the item will be destroyed when its parent item is
destroyed. Although QGraphicsObject inherits from both <a href="qobject.html">QObject</a> and <a href="qgraphicsitem.html">QGraphicsItem</a>, you should use the
functions provided by <a href="qgraphicsitem.html">QGraphicsItem</a>, <i>not</i> <a href="qobject.html">QObject</a>, to manage the relationships between
parent and child items.</p>
<p>The relationships between items can be explored using the
<a href="qgraphicsitem.html#parentItem">parentItem</a>() and
<a href="qgraphicsitem.html#childItems">childItems</a>() functions.
In the hierarchy of items in a scene, the <a href="qgraphicsitem.html#parentObject">parentObject</a>() and <a href="qgraphicsitem.html#parentWidget">parentWidget</a>() functions are
the equivalent of the <a href="qobject.html#parent">QWidget.parent</a>() and <a href="qwidget.html#parentWidget">QWidget.parentWidget</a>() functions
for <a href="qwidget.html">QWidget</a> subclasses.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsObject" />QGraphicsObject.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qgraphicsobject.html">QGraphicsObject</a>
with <i>parent</i>.</p>


<h3 class="fn"><a name="grabGesture" />QGraphicsObject.grabGesture (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>&#160;<i>type</i>, <a href="qt-gestureflags.html">Qt.GestureFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.GestureFlags(0))</h3><p>Subscribes the graphics object to the given <i>gesture</i> with
specific <i>flags</i>.</p>
<p><b>See also</b> <a href="qgraphicsobject.html#ungrabGesture">ungrabGesture</a>() and
<a href="qgestureevent.html">QGestureEvent</a>.</p>


<h3 class="fn"><a name="ungrabGesture" />QGraphicsObject.ungrabGesture (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>&#160;<i>type</i>)</h3><p>Unsubscribes the graphics object from the given
<i>gesture</i>.</p>
<p><b>See also</b> <a href="qgraphicsobject.html#grabGesture">grabGesture</a>() and <a href="qgestureevent.html">QGestureEvent</a>.</p>


<h3 class="fn"><a name="updateMicroFocus" />QGraphicsObject.updateMicroFocus (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void updateMicroFocus()</tt>.</p><p>Updates the item's micro focus. This is slot for
convenience.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qinputcontext.html">QInputContext</a>.</p>


<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="enabledChanged" />void enabledChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the item get's enabled or
disabled.</p>
<p><b>See also</b> <a href="qgraphicsitem.html#isEnabled">isEnabled</a>().</p>


<h3 class="fn"><a name="opacityChanged" />void opacityChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the opacity of the item
changes</p>
<p><b>See also</b> <a href="qgraphicsitem.html#opacity">QGraphicsItem.opacity</a>().</p>


<h3 class="fn"><a name="parentChanged" />void parentChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the parent of the item
changes</p>


<h3 class="fn"><a name="rotationChanged" />void rotationChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the roation of the item
changes.</p>


<h3 class="fn"><a name="scaleChanged" />void scaleChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the scale of the item changes.</p>


<h3 class="fn"><a name="visibleChanged" />void visibleChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the visibility of the item
changes</p>
<p><b>See also</b> <a href="qgraphicsobject.html#visible-prop">visible</a>.</p>


<h3 class="fn"><a name="xChanged" />void xChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the x position of the item
changes</p>
<p><b>See also</b> <a href="qgraphicsitem.html#pos">pos</a>().</p>


<h3 class="fn"><a name="yChanged" />void yChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the y position of the item
changes.</p>
<p><b>See also</b> <a href="qgraphicsitem.html#pos">pos</a>().</p>


<h3 class="fn"><a name="zChanged" />void zChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the z value of the item
changes.</p>
<p><b>See also</b> <a href="qgraphicsitem.html#pos">pos</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>